#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: v1_api_body.py 
@version:
@time: 2021/12/31 
"""
from TapClientCore.T03_api_body_templates.api_body_base import *

# 功能路径
DATASOURCE = 'datasource'

DATAFLOW = 'dataflow'
# create: 创建一个任务
create = 'create'
# node： 区分不同步节点
node = 'node'
# setting: 任务设置
setting = 'setting'

INSPECTS = 'inspects'
META = 'meta'

# DATASOURCE

# http
DATASOURCE_HTTP_CUSTOM = read_json(path_joint(V1, DATASOURCE, 'http', 'custom.json'))
DATASOURCE_HTTP_KAFKA = read_json(path_joint(V1, DATASOURCE, 'http', 'kafka.json'))
DATASOURCE_HTTP_MQ = read_json(path_joint(V1, DATASOURCE, 'http', 'MQ.json'))

# websockets
DATASOURCE_WS_CUSTOMER_TEST = read_json(path_joint(V1, DATASOURCE, 'ws', 'testConnection.json'))

# DATAFLOW

# create
DATAFLOW_CRATE_DAAS_CLONE = read_json(path_joint(V1, DATAFLOW, create, 'daas_clone.json'))
DATAFLOW_CRATE_DAAS_SYNC = read_json(path_joint(V1, DATAFLOW, create, 'daas_sync.json'))
DATAFLOW_CRATE_DFS_CLONE = read_json(path_joint(V1, DATAFLOW, create, 'dfs_clone.json'))
DATAFLOW_CRATE_DFS_SYNC = read_json(path_joint(V1, DATAFLOW, create, 'dfs_sync.json'))
# node
DATAFLOW_NODE_CLONE_SOURCE = read_json(path_joint(V1, DATAFLOW, node, 'clone', 'source.json'))
DATAFLOW_NODE_CLONE_SINK = read_json(path_joint(V1, DATAFLOW, node, 'clone', 'sink.json'))
DATAFLOW_NODE_SYNC_SOURCE = read_json(path_joint(V1, DATAFLOW, node, 'sync', 'source.json'))
DATAFLOW_NODE_SYNC_SINK = read_json(path_joint(V1, DATAFLOW, node, 'sync', 'sink.json'))
DATAFLOW_NODE_SYNC_SINK_REDIS = read_json(path_joint(V1, DATAFLOW, node, 'sync', 'redis.json'))
DATAFLOW_NODE_SYNC_JAVASCRIPT = read_json(path_joint(V1, DATAFLOW, node, 'sync', 'javaScript.json'))
DATAFLOW_NODE_SYNC_JOINTABLE = read_json(path_joint(V1, DATAFLOW, node, 'sync', 'joinTable.json'))
# setting
DATAFLOW_SETTING_DEFAULT = read_json(path_joint(V1, DATAFLOW, setting, 'default.json'))

if __name__ == '__main__':
    print(DATASOURCE_HTTP_CUSTOM)
    print(DATASOURCE_HTTP_KAFKA)
    print(DATASOURCE_HTTP_MQ)
